package io.vector.study.algorithm.heap;

/**
 * Created by vector on 2017/3/15.
 */
public interface Heap<E> {

    void add(E e);

    /**
     * peek top element, but don't remove it
     * @return
     */
    E peek();

    /**
     * remove top element and return it
     * @return
     */
    E pop();

    void clear();

    boolean isEmpty();

    int size();

    E[] toArray();

}
